package alg1_baseModel;
//编写一段代码，打印出一个M行N列的二维数组的转置（交换行和列）。
public class Test1_1_13 {
    public static void main(String[] args) {
        int[][] a = {
                {1,2,3,4,5},
                {1,2,3,4,5},
                {1,2,3,4,5},
                {1,2,3,4,5},
                {1,2,3,4,5}};

        for (int i = 0; i < a.length; i++) {
            int[] b = a[i];
            for (int j = 0; j < b.length; j++) {
                System.out.print(a[j][i]);
            }
            System.out.println();
        }
    }
}
